C++ adds a third storage class termed FREE storage. Allocation and deallocation of free-store variables occurs at points defined by the programmer, without regard for function boundaries. This ability is also available to C programmers via the standard library functions malloc() and free(), but not as part of the language definition.
The 'new' operator returns a pointer to a block of memory large enough to accomodate the desired type, or the NULL pointer if memory is unavailable. The 'delete' operator deallocates the space pointed to by the pointer.
struct personnel_rec *jack; /* 'new' allocates space */
jack = new struct personnel_rec; /* C++ syntax */
.
.
delete jack;
TC provides standard functions new() and delete() to emulate these operators, with the restriction that they can only be applied to "class" types (Chapter 4).